var data1 = [{'id':'1','operationtype':'修改类型','operationman':'修改人员','operationdate':'time','modificationcontent':'内容','customername':'text1','email':'text2','cucustomerpost':'text3','phone':'text4','mobilephone':'text5','customerwechat':'text6','expressaddress':'text7','customerbirthday':'text8','customerremark':'text9','purchaseman':'text10'}];

var layer = layui.layer //弹层
    ,table = layui.table //表格
    form = layui.form,$ = layui.jquery,id=getQueryVariable("id");

//表单初始值，修改时调用
if(id!=""){
    form.val("editor-form",{
        "customerabbreviation":"进入查看供应商信息明细",
    })
}$('#editor-form').find('input,textarea,select').attr('disabled',true);
//---客户查询
table.render({
    elem: '#supplierselect'
    ,data:data1
    ,toolbar: '#suppliertoolbar'
    ,cols: [[
        {checkbox: true, fixed: true}
        ,{field:'customername', title:'联系人名称', sort: true}
        ,{field:'email', title:'邮箱地址', sort: true}
        ,{field:'cucustomerpost', title:'职务', sort: true}
        ,{field:'phone', title:'电话', sort: true}
        ,{field:'mobilephone', title:'手机', sort: true}
        ,{field:'customerwechat', title:'微信', sort: true}
        ,{field:'expressaddress', title:'快件地址', sort: true}
        ,{field:'customerbirthday', title:'联系人生日', sort: true}
        ,{field:'customerremark', title:'联系人备注', sort: true}
        ,{field:'purchaseman', title:'采购员', sort: true}
    ]]
    ,id: 'suppliertableid'
    ,page: true
    ,height:300
});

//---银行信息
table.render({
    elem: '#bankselect'
    ,data:data1
    ,toolbar: '#banktoolbar'
    ,cols: [[
        {checkbox: true, fixed: true}
        ,{field:'bankname', title:'银行名称', sort: true}
        ,{field:'bankaccount', title:'银行帐号', sort: true}
        ,{field:'accountname', title:'账号姓名', sort: true}
        ,{field:'remark', title:'备注', sort: true}
    ]]
    ,id: 'banktableid'
    ,page: true
    ,height:350
});

//---日志
table.render({
    elem: '#infoselect'
    ,data:data1
    ,cols: [[
        {field:'operationtype', title:'操作类型', sort: true}
        ,{field:'operationman', title:'操作员', sort: true}
        ,{field:'operationdate', title:'操作日期', sort: true}
        ,{field:'modificationcontent', title:'修改内容', sort: true}
    ]]
    ,id: 'contacttableid'
    ,page: true
    ,height:350
});
$("#shared").on('click',function () {
    layer.open({
        type: 2,
        area: ['1488px', '800px'],
        content: 'views/jsp/BasicData/tpl/shared.jsp'
    });
});
$("#shutdown").on('click',function () {
    parent.detab("views/jsp/BasicData/tpl/viewsupplierinfo.jsp"+(id==''?'':'?id='+id));
});